//
//  VECreatAssociationTableViewCell.m
//  VEMoneyPorject
//
//  Created by BlueWind on 2018/9/7.
//  Copyright © 2018年 陈建. All rights reserved.
//

#import "VECreatAssociationTableViewCell.h"

@implementation VECreatAssociationTableViewCell

{
    UIImageView *_associationImageView;
    
    UILabel *_associationName;
    
}

/** 返回循环利用的cell */
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    if (self= [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        self.selectionStyle = UITableViewCellSelectionStyleNone;
        [self loadDefaultSetting];
    }
    return self;
}

/** 加载默认UI元素和需要的数据 */
- (void)loadDefaultSetting {
    _associationImageView = [UIImageView new];
    [self.contentView addSubview:_associationImageView];
    [_associationImageView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerY.equalTo(self.contentView);
        make.left.equalTo(self.contentView).offset(15);
        make.size.mas_equalTo(CGSizeMake(55, 55));
    }];
    _associationImageView.layer.cornerRadius = 5;
    _associationImageView.layer.masksToBounds = YES;
    _associationImageView.contentMode = UIViewContentModeScaleAspectFill;
    _associationImageView.image = [UIImage imageNamed:@"c照片添加"];
    
    _associationName = [UILabel new];
    [self.contentView addSubview:_associationName];
    [_associationName mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerY.equalTo(self->_associationImageView);
        make.left.equalTo(self->_associationImageView.mas_right).offset(20);
        make.right.equalTo(self.contentView).offset(-90);
    }];
    _associationName.text = @"创建社群";
    

}

@end
